function scx = pick_scale(series, data)

    scx = 0;
    for i = 1:length(data)
        
        tosolve = @(s) log_linear_scale_mod(series,scx, s,i)/series(end) - data(i); 
        try
            scx(i) = fzero(tosolve, .1);
        catch
            disp('oops')
        end
    end

end